1 /* 2 D bindings for CUDA. 3 Authors: Prasun Anand 4 Copyright: Copyright (c) 2017, Prasun Anand. All rights reserved. 5 License: BSD 3-Clause License 6 */ 7 8 module cuda_d.vector_types; 9 10 import core.stdc.config; 11 12 extern (C): 13 14 /*DEVICE_BUILTIN*/ 15 struct char1 16 { 17 byte x; 18 } 19 20 /*DEVICE_BUILTIN*/ 21 struct uchar1 22 { 23 ubyte x; 24 } 25 26 /*DEVICE_BUILTIN*/ 27 struct char2 28 { 29 byte x; 30 byte y; 31 } 32 33 /*DEVICE_BUILTIN*/ 34 struct uchar2 35 { 36 ubyte x; 37 ubyte y; 38 } 39 40 /*DEVICE_BUILTIN*/ 41 struct char3 42 { 43 byte x; 44 byte y; 45 byte z; 46 } 47 48 /*DEVICE_BUILTIN*/ 49 struct uchar3 50 { 51 ubyte x; 52 ubyte y; 53 ubyte z; 54 } 55 56 /*DEVICE_BUILTIN*/ 57 struct char4 58 { 59 byte x; 60 byte y; 61 byte z; 62 byte w; 63 } 64 65 /*DEVICE_BUILTIN*/ 66 struct uchar4 67 { 68 ubyte x; 69 ubyte y; 70 ubyte z; 71 ubyte w; 72 } 73 74 /*DEVICE_BUILTIN*/ 75 struct short1 76 { 77 short x; 78 } 79 80 /*DEVICE_BUILTIN*/ 81 struct ushort1 82 { 83 ushort x; 84 } 85 86 /*DEVICE_BUILTIN*/ 87 struct short2 88 { 89 short x; 90 short y; 91 } 92 93 /*DEVICE_BUILTIN*/ 94 struct ushort2 95 { 96 ushort x; 97 ushort y; 98 } 99 100 /*DEVICE_BUILTIN*/ 101 struct short3 102 { 103 short x; 104 short y; 105 short z; 106 } 107 108 /*DEVICE_BUILTIN*/ 109 struct ushort3 110 { 111 ushort x; 112 ushort y; 113 ushort z; 114 } 115 116 /*DEVICE_BUILTIN*/ 117 struct short4 118 { 119 short x; 120 short y; 121 short z; 122 short w; 123 } 124 125 /*DEVICE_BUILTIN*/ 126 struct ushort4 127 { 128 ushort x; 129 ushort y; 130 ushort z; 131 ushort w; 132 } 133 134 /*DEVICE_BUILTIN*/ 135 struct int1 136 { 137 int x; 138 } 139 140 /*DEVICE_BUILTIN*/ 141 struct uint1 142 { 143 uint x; 144 } 145 146 /*DEVICE_BUILTIN*/ 147 struct int2 148 { 149 int x; 150 int y; 151 } 152 153 /*DEVICE_BUILTIN*/ 154 struct uint2 155 { 156 uint x; 157 uint y; 158 } 159 160 /*DEVICE_BUILTIN*/ 161 struct int3 162 { 163 int x; 164 int y; 165 int z; 166 } 167 168 /*DEVICE_BUILTIN*/ 169 struct uint3 170 { 171 uint x; 172 uint y; 173 uint z; 174 } 175 176 /*DEVICE_BUILTIN*/ 177 struct int4 178 { 179 int x; 180 int y; 181 int z; 182 int w; 183 } 184 185 /*DEVICE_BUILTIN*/ 186 struct uint4 187 { 188 uint x; 189 uint y; 190 uint z; 191 uint w; 192 } 193 194 /*DEVICE_BUILTIN*/ 195 struct long1 196 { 197 c_long x; 198 } 199 200 /*DEVICE_BUILTIN*/ 201 struct ulong1 202 { 203 c_ulong x; 204 } 205 206 /*DEVICE_BUILTIN*/ 207 struct long2 208 { 209 c_long x; 210 c_long y; 211 } 212 213 /*DEVICE_BUILTIN*/ 214 struct ulong2 215 { 216 c_ulong x; 217 c_ulong y; 218 } 219 220 /*DEVICE_BUILTIN*/ 221 struct long3 222 { 223 c_long x; 224 c_long y; 225 c_long z; 226 } 227 228 /*DEVICE_BUILTIN*/ 229 struct ulong3 230 { 231 c_ulong x; 232 c_ulong y; 233 c_ulong z; 234 } 235 236 /*DEVICE_BUILTIN*/ 237 struct long4 238 { 239 c_long x; 240 c_long y; 241 c_long z; 242 c_long w; 243 } 244 245 /*DEVICE_BUILTIN*/ 246 struct ulong4 247 { 248 c_ulong x; 249 c_ulong y; 250 c_ulong z; 251 c_ulong w; 252 } 253 254 /*DEVICE_BUILTIN*/ 255 struct float1 256 { 257 float x; 258 } 259 260 /*DEVICE_BUILTIN*/ 261 struct float2_ 262 { 263 float x; 264 float y; 265 } 266 267 /*DEVICE_BUILTIN*/ 268 struct float3 269 { 270 float x; 271 float y; 272 float z; 273 } 274 275 /*DEVICE_BUILTIN*/ 276 struct float4 277 { 278 float x; 279 float y; 280 float z; 281 float w; 282 } 283 284 /*DEVICE_BUILTIN*/ 285 struct double2_ 286 { 287 double x; 288 double y; 289 } 290 291 /*DEVICE_BUILTIN*/ 292 293 /*DEVICE_BUILTIN*/ 294 struct dim3 295 { 296 uint x; 297 uint y; 298 uint z; 299 }